package com.xinqi.modules.exam.paper.client;

import com.xinqi.common.base.constants.ServiceNameConstants;
import com.xinqi.common.base.response.PageInfo;
import com.xinqi.common.base.response.R;
import com.xinqi.modules.exam.paper.dto.req.CourseExamPaperQueryDTO;
import com.xinqi.modules.exam.paper.dto.req.CourseExamPaperUpdateDTO;
import com.xinqi.modules.exam.paper.dto.rsp.CourseExamPaperResultDTO;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 课程测评客户端
 *
 * @author: linkai
 * @date: 2023/07/02
 */
@FeignClient(contextId = "courseExamPaperClient", value = ServiceNameConstants.XQ_EXAM)
public interface CourseExamPaperClient {
    String INNER_PREFIX = "/inner/exam-paper";

    /**
     * 课程测评-分页
     */
    @GetMapping(INNER_PREFIX + "/page")
    R<PageInfo<CourseExamPaperResultDTO>> page(CourseExamPaperQueryDTO dto);

    /**
     * 课程测评-详情
     */
    @GetMapping(INNER_PREFIX + "/{id}")
    R<CourseExamPaperResultDTO> findById(@PathVariable("id") Long id);

    /**
     * 修改课程测评
     */
    @Operation(summary = "修改课程测评")
    @PutMapping("/{id}")
    R<Boolean> update(@PathVariable("id") Long id, @RequestBody CourseExamPaperUpdateDTO dto);

}
